 	
<html>

<div class="content-inner">
	<div class="marg20-btm">
           <a href=<?php echo site_url('backend_pages/allItem'); ?> class="btn btn-primary">&hearts; View Advertisings </a>
                         </div>
<form action=<?php echo site_url('backend_pages/sel_upateItem'); ?> method="post" class="form-horizontal" enctype="multipart/form-data" />
<?php echo validation_errors(); ?>
    <?php 
	if($adver_up->num_rows()>0){
		foreach($adver_up->result() as $row){
			$adv_img = array(
						'src' => 'advertising/uploads/' .$row->media_img,
						'width' => '55px',
						'height' => '40px'
						);
			$getimg = array(
					  'name' => 'adver_img',
					  'type' => 'hidden',
					  'class' => 'input-xlarge',
					  'id' => 'input01',
					  'value' => $row->media_img
					  );
			
			
			$adv_name = array(
					  'name' => 'adverName',
					  'placeholder' => 'Advertising Name.....',
					  'class' => 'input-xlarge',
					  'id' => 'input01',
					  'value' => $row->media_name
					  );
			$adv_URL = array(
					  'name' => 'adverUrl',
					  'placeholder' => 'Advertising URL.....',
					  'class' => 'input-xlarge',
					  'id' => 'input01',
					  'value' => $row->media_url
					  );
			$adv_upload = array(
					  'name' => 'userfile',
					  'class' => 'input-xlarge',
					  'id' => 'input01',
					  'type' => 'file'
					  );
			$adv_submit = array(
					  'name' => 'btn_upload_adver',
					  'class' => 'btn btn-primary',
					  'id' => 'input01',
					  'type' => 'submit',
					  'value' => 'Update'
					  );
			$adv_position = array(
					  $row->media_position_id => $row->pos_name,
					  '1' => 'Banner top',
					  '2' => 'Banner big left',
					  '3' => 'Banner big right',
					  '4' => 'Banner side left'
					  );
		 
				}
			}
 
 ?>
               
                        <div class="control-group" class="form-horizontal">
                             <div class="product_img">
                             	<?php echo img($adv_img); ?>
                             </div>
                             <br />
                               <label class="control-label" for="input01">AdvertiseName </label>
                               <div class="controls">
                                 <?php echo form_input($adv_name); ?>
                                 <?php echo form_input($getimg); ?>
                               </div>
                             </div>
                             
                            
                             <div class="control-group">
                               <label class="control-label" for="input01">URL </label>
                               <div class="controls">
                                 <?php echo form_input($adv_URL); ?>
                               </div>
                             </div>
                              <div class="control-group">
                               <label class="control-label" for="input01">Position </label>
                               <div class="controls">
                                 <?php echo form_dropdown('adverPos',$adv_position); ?>
                               </div>
                             </div>
                            
                             <div class="control-group">
                               <label class="control-label" for="fileInput">Image Advertising</label>
                               <div class="controls">
                                 <?php echo form_input($adv_upload); ?>
                               </div>
                             </div>
                             <div class="form-actions">
                                <?php echo form_input($adv_submit); ?>
                                 <a href="<?php echo site_url('backend_pages/allItem'); ?>" class="btn">Cancel </a>
                             </div>
                         </form> 